package com.cruel_wandering.wifi_geo_predictor.wifi_simulation;

import android.net.wifi.SupplicantState;
import android.net.wifi.WifiInfo;

public class MyWifiInfo
{
	private String BSSID;
	private boolean hiddenSSID;
	private int ipAddress;
	private int linkSpeed;
	private int networkId;
	private int rssi;
	private String SSID;
	private SupplicantState supplicantState;

	public MyWifiInfo(WifiInfo info)
	{
	  super();
	  this.BSSID = info.getBSSID();
	  this.hiddenSSID = info.getHiddenSSID();
	  this.ipAddress = info.getIpAddress();
	  this.linkSpeed = info.getLinkSpeed();
	  this.networkId = info.getNetworkId();
	  this.rssi = info.getRssi();
	  this.SSID = info.getSSID();
	  this.supplicantState = info.getSupplicantState();
	}

	public MyWifiInfo(String BSSID, boolean hiddenSSID, int ipAddress,
    int linkSpeed, int networkId, int rssi, String SSID,
    SupplicantState supplicantState)
  {
	  super();
	  this.BSSID = BSSID;
	  this.hiddenSSID = hiddenSSID;
	  this.ipAddress = ipAddress;
	  this.linkSpeed = linkSpeed;
	  this.networkId = networkId;
	  this.rssi = rssi;
	  this.SSID = SSID;
	  this.supplicantState = supplicantState;
  }

	public String getBSSID()
  {
  	return BSSID;
  }

	public boolean getHiddenSSID()
  {
  	return hiddenSSID;
  }

	public int getIpAddress()
  {
  	return ipAddress;
  }

	public int getLinkSpeed()
  {
  	return linkSpeed;
  }

	public int getNetworkId()
  {
  	return networkId;
  }

	public int getRssi()
  {
  	return rssi;
  }

	public String getSSID()
  {
  	return SSID;
  }

	public SupplicantState getSupplicantState()
  {
  	return supplicantState;
  }

	private String fieldToString(String name, Object value)
	{
		return name + ": " + ((value == null) ? "(nil)" : value.toString()) + ";\n";
	}

	public String toString()
	{
		return fieldToString("SSID", SSID) +
		  fieldToString("BSSID", SSID) +
		  fieldToString("hiddenSSID", hiddenSSID) +
		  fieldToString("ipAddress", ipAddress) +
		  fieldToString("linkSpeed", linkSpeed) +
		  fieldToString("networkId", networkId) +
		  fieldToString("rssi", rssi) +
		  fieldToString("supplicantState", supplicantState);
	}
}